package com.elegantmall.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("goods")
public class GoodsPojo {

    @TableId(value = "goods_id" , type = IdType.ASSIGN_ID)//自动分配
    private String goodsId;

    @TableField("goods_name")
    private String goodsName;

    @TableField("price")
    private double price;

    @TableField("number")//库存
    private int number;

    @TableField("category")
    private String category;

    @TableField("description")
    private String description;

    @TableField("image")//存储图片文件路径
    private String image;

    @TableField("status")//上架/下架
    private int status = 1;

    @TableField("seller_name")//卖家
    private String sellerName;

}
